package com.carol.lmsbe.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 易耗品明细实体类
 */
@Data
@TableName("consumable_item")
public class ConsumableItem {

    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField("plan_id")
    private Long planId;

    @TableField("name")
    private String name;

    @TableField("specification")
    private String specification;

    @TableField("unit")
    private String unit;

    @TableField("unit_price")
    private BigDecimal unitPrice;

    @TableField("planned_quantity")
    private Integer plannedQuantity;

    @TableField("actual_quantity")
    private Integer actualQuantity;

    @TableField("total_amount")
    private BigDecimal totalAmount;

    @TableField("brand")
    private String brand;

    @TableField("supplier")
    private String supplier;

    @TableField("purchase_status")
    private String purchaseStatus;

    @TableField("purchase_date")
    private LocalDate purchaseDate;

    @TableField("remark")
    private String remark;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}
